import { reactive } from "vue";
import { GetCategory } from "@/api/info";

// 自定义hook
export const useCategoryHook = () => {
  const infoData = reactive({
    category_options: []
  });
  // 获取分类
  const handleGetCategory = async () => {
    let res = await GetCategory();
    infoData.category_options = res.data;
  }
  return {
    infoData,
    handleGetCategory
  }
}